Component to package #89
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Creating a pre-build process to install and fetch data for the components that are transformed into npm packages.
the prebuild process goes through the main.agml and finds any
i(install) function call and accordingly installs the package, then writes the fetchDataFunction into thelib/util/main.tsfile so that duringbun run devcommand the data can be fetched for all the packages including the new ones.To fetch data for the package the npm package must export a function called - "fetchDataFunction".
further to install and use package in project follow below syntax:
use
i <package name>to install the package in projectuse
use <component name> from <package name>to import it.use
get Datato retrieve data (if any) used for the component.example:
i @meet-159/discor-stats-counteruse Discordstatscounter from @meet-159/discor-stats-counterget discordCounters<Discordstatscounter {discordCounters} />